﻿<UserControl x:Class="MvvmTwitter.Views.UglyDisplayView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="850">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Black" 
                    Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
                    Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Grid}}, Path=ActualHeight}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Button Content="Get them tweets!" Width="150" Height="50" HorizontalAlignment="Left" Margin="10" Command="{Binding OnHitMeClick}" />
        <DataGrid Margin="10,10,10,25" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" 
                              IsReadOnly="True" Grid.Row="1" HorizontalContentAlignment="Stretch" 
                              VerticalContentAlignment="Top" AutoGenerateColumns="True" 
                              ItemsSource="{Binding TwitterizerTweets, Mode=OneWay}" />

        <Button Command="{Binding OnSwitchToPretty}" Content="Switch To Prettier View" Height="25" Width="150" Margin="0,0,0,20" VerticalAlignment="Bottom" />
    </Grid>
</UserControl>
